package com.lvmama.rhino.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lvmama.rhino.entity.CommonStatisticsSqlVO;
import com.lvmama.rhino.entity.DeviceStatisticsSqlVO;
import com.lvmama.rhino.entity.NettypeStatisticsSqlVO;
import com.lvmama.rhino.entity.RegionStatisticsSqlVO;
import com.lvmama.rhino.entity.StatisticsSqlVO;
import com.lvmama.rhino.mapper.TreeStatisticsMapper;
import com.lvmama.rhino.pojo.CodeNode;
import com.lvmama.rhino.pojo.CommonStatisticsResult;
import com.lvmama.rhino.pojo.DeviceStatisticsResult;
import com.lvmama.rhino.pojo.FlowStatisticsResult;
import com.lvmama.rhino.pojo.NettypeStatisticsResult;
import com.lvmama.rhino.pojo.RegionStatisticsResult;
import com.lvmama.rhino.pojo.TreeNodeView;
import com.lvmama.rhino.service.TreeStatisticsService;

@Service("treeStatisticsService")
public class TreeStatisticsServiceImpl implements TreeStatisticsService{
    
    /**
     * 日志
     */
    protected Logger logger = Logger.getLogger(this.getClass());
    
    @Autowired
    private TreeStatisticsMapper messageMapper;

	@Override
	public List<TreeNodeView> QueryAllTreeNodeView() {
		List<TreeNodeView> viewList;
		viewList = messageMapper.QueryAllTreeNodeView();
		return viewList;
	}
	
	@Override
	public List<CodeNode> QueryAllCodeNode() {
		List<CodeNode> viewList;
		viewList = messageMapper.QueryAllCodeNode();
		return viewList;
	}
	
	@Override
	public void insertTreeNodeView(TreeNodeView treeNodeView) {
		messageMapper.insertTreeNodeView(treeNodeView);
	}
	
	@Override
	public void deleteTreeNodeView(TreeNodeView treeNodeView) {
		messageMapper.deleteTreeNodeView(treeNodeView);
	}
	
	@Override
	public List<String> QueryDataByNode(){
		List<String> listStr = messageMapper.QueryDataByNode();
		return listStr;
	}
	
	@Override
	public List<FlowStatisticsResult> QueryFlowSticsResByNode(StatisticsSqlVO ss) {
		List<FlowStatisticsResult> viewList = messageMapper.QueryFlowSticsResByNode(ss);
		return viewList;
	}


	@Override
	public List<FlowStatisticsResult> QueryFSConversion(StatisticsSqlVO ss) {
		List<FlowStatisticsResult> viewList = messageMapper.QueryFSConversion(ss);
		return viewList;
	}


	@Override
	public List<DeviceStatisticsResult> QueryDeviceFS(DeviceStatisticsSqlVO ss) {
		List<DeviceStatisticsResult> viewList = messageMapper.QueryDeviceFS(ss);
		return viewList;
	}


	@Override
	public List<NettypeStatisticsResult> QueryNettypeFS(NettypeStatisticsSqlVO ss) {
		List<NettypeStatisticsResult> viewList = messageMapper.QueryNettypeFS(ss);
		return viewList;
	}


	@Override
	public List<RegionStatisticsResult> QueryRegionFS(RegionStatisticsSqlVO ss) {
		List<RegionStatisticsResult> viewList = messageMapper.QueryRegionFS(ss);
		return viewList;
	}
	
	@Override
	public List<CommonStatisticsResult> QueryCommonFS(CommonStatisticsSqlVO ss) {
		List<CommonStatisticsResult> viewList = messageMapper.QueryCommonFS(ss);
		return viewList;
	}
}
